import 'package:aio/aio.dart';
import 'package:flutter/cupertino.dart';
import 'package:sdk_plugin/baidu_map_utils.dart' as sdk;
import 'package:sdk_plugin/call_back.dart' as callback;

class AppBaiduMapUtils {
  ///开始定位
  static startLocation(
      BuildContext context,
      callback.ResponseCallbackWithT<sdk.BaiduMapLocation>?
          responseCallbackWithT) {
    PermissionUtils.request_location_alert(context, (value) {
      if (value) {
        sdk.BaiduMapUtils.startLocation(context, responseCallbackWithT);
      }
    });
  }

  ///停止定位
  static stopLocation(BuildContext context) {
    sdk.BaiduMapUtils.stopLocation(context);
  }
}
